package designpattern.chainresponsibility;

public class LoggerFactory {
    public static AbstractLogger getLoggerFactory(){
        OneLogger oneLogger = new OneLogger(AbstractLogger.ONE);
        TwoLogger twoLogger = new TwoLogger(AbstractLogger.TWO);
        ThreeLogger threeLogger = new ThreeLogger(AbstractLogger.THREE);
        FourLogger fourLogger = new FourLogger(AbstractLogger.FOUR);
        FiveLogger fiveLogger = new FiveLogger(AbstractLogger.FIVE);

        oneLogger.setNextLogger(twoLogger);
        twoLogger.setNextLogger(threeLogger);
        threeLogger.setNextLogger(fourLogger);
        fourLogger.setNextLogger(fiveLogger);

        return oneLogger;
    }
}
